<?php 
	$menugroup = $this->menugroup;
	$status	  = $this->status;
	$message  = null;
	if($status == 1){
		$message = '<div class="ub_message">Dữ liệu đã được cập nhật thành công</div>';
	}elseif($status == "-1"){
		$message = '<div class="ub_message"><span>Có lỗi sảy ra trong quá trình cập nhật dữ liệu</span></div>';
	}
	if(isset($menugroup['group_order'])){
		$group_order = $menugroup['group_order'];
	}else{
		$group_order = 0;
	}
?>
<div class='row' id='content-wrapper'>
            <div class='col-xs-12'>
              <div class='row'>
                <div class='col-sm-12'>
                  <div class='page-header'>
                    <h1 class='pull-left'>
                      <i class='icon-edit'></i>
                      <span class="page_title">Thêm mới / Cập nhật nhóm menu</span>
                    </h1>
                  </div>
                </div>
              </div>
              <div class='row'>
                <div class='col-sm-12'>
                  <div class='box'>
                    <div class='box-header blue-background'>
                      <div class='title'>
                        <div class='icon-edit'></div>
                        Nhóm menu
                      </div>
                      <div class='actions'>
                        <a class="btn box-remove btn-xs btn-link" href="#"><i class='icon-remove'></i>
                        </a>
                        <a class="btn box-collapse btn-xs btn-link" href="#"><i></i>
                        </a>
                      </div>
                    </div>
                    <div class='box-content'>
                        <form id="frmUpdate" name="frmUpdate" class="form form-horizontal" style="margin-bottom: 0;" method="post" action="<?php echo WEB_PATH;?>/administrator/menugroup/update" accept-charset="UTF-8">
						<span class="page_title"><input type="hidden" id="id" name="id" value="<?php echo $this->id;?>">
						<input type="hidden" id="do" name="do" value="submit" />
                        <input name="authenticity_token" type="hidden" /><div class='form-group'>
                        <label class='col-md-3 control-label' for='group_name'>Tên nhóm menu</label>
                        <div class='col-md-5'>
                        	<input type="text" class='form-control' id="group_name" name="group_name" value="<?php echo @$menugroup['group_name'];?>" />
                        	<span class="font_normal">Nhóm menu chỉ xuất hiện ở left menu khi có ít nhất 1 menu được gán vào nhóm.</span>
                        </div>
                      </div>
                      <div class='form-group'>
                        <label class='col-md-3 control-label' for='group_order'>Vị trí sắp xếp</label>
                        <div class='col-md-5'>
                        	<input  class='form-control' type="text" id="group_order" name="group_order" value="<?php echo @$menugroup['group_order'];?>" />
                        	<span class="font_normal">Số càng cao vì vị trí càng cao trong left menu</span>
                        </div>
                      </div>
                      <div class='form-group'>
                        <label class='col-md-3 control-label' for='group_url'>URL</label>
                        <div class='col-md-5'>
                        	<input  class='form-control' type="text" id="group_url" name="group_url" value="<?php echo @$menugroup['group_url'];?>" />
                        	<span class="font_normal">http://localhost/wish/administrator/news hoặc http://domain.com/administrator/news</span>
                        </div>
                      </div>
                      <div class='form-group'>
                        <label class='col-md-3 control-label' for='group_icon'>Icon</label>
                        <div class='col-md-5'>
                        	<input  class='form-control' type="text" id="group_icon" name="group_icon" value="<?php echo @$menugroup['group_icon'];?>" />
                        </div>
                      </div>
                      <div class='form-group'>
                        <label class='col-md-3 control-label' for='description'>Mô tả về nhóm menu</label>
                        <div class='col-md-5'>
                        	<textarea  class='form-control' type="text" id="description" name="description"><?php echo @$menugroup['description'];?></textarea>
                        </div>
                      </div>
                      <div class='form-actions form-actions-padding-sm'>
                        <div class='row'>
                          <div class='col-md-9 col-md-offset-3'>
                            <button class='btn btn-primary' onclick="return validateData()" >
                              <i class='icon-save'></i>
                              Save
                            </button>
                            <a href="<?php echo WEB_PATH.'/administrator/menugroup';?>"><div class='btn'>Cancel</div></a>
                          </div>
                        </div>
                      </div>
                      </form>
                    </div>
                  </div>
                </div>
              </div>
            </div>
</div>